import java.io.*;

// 会员类
class Member implements Serializable {
    private String cardNumber;
    private String name;
    private int points;

    public Member(String cardNumber, String name) {
        this.cardNumber = cardNumber;
        this.name = name;
        this.points = 0; 
    }

    public void addPoints(int points) {
        this.points += points;
    }

    public boolean redeemPoints(int pointsToRedeem) {
        if (this.points >= pointsToRedeem) {
            this.points -= pointsToRedeem;
            return true;
        }
        return false;
    }

    public int getPoints() {
        return points;
    }

    public String getCardNumber() {
        return cardNumber;
    }

}

// 超市类
class Supermarket implements Serializable {
    private String name;
    private String address;
    private transient HashMap<String, Member> members; 

    public Supermarket(String name, String address) {
        this.name = name;
        this.address = address;
        this.members = new HashMap<>();
    }

    public void addMember(Member member) {
        members.put(member.getCardNumber(), member);
    }

    public Member getMember(String cardNumber) {
        return members.get(cardNumber);
    }

}
